﻿<UserControl x:Class="KarateSemaphore.Phone.SemaphoreViewNormal"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:view="clr-namespace:KarateSemaphore.Phone"
             xmlns:core="clr-namespace:KarateSemaphore.Core;assembly=KarateSemaphore.Core"
             mc:Ignorable="d" 
        d:DataContext="{d:DesignInstance core:SemaphoreViewModel, IsDesignTimeCreatable=True}"
        d:DesignHeight="300" d:DesignWidth="582">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Style.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Background="{StaticResource ResourceKey=panelBackground}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="9*"/>
            <ColumnDefinition Width="4*"/>
            <ColumnDefinition Width="9*"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="0" />
            <RowDefinition Height="5*" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*"/>
            <RowDefinition Height="3*" />
        </Grid.RowDefinitions>

        <Border Grid.Column="0" Grid.RowSpan="5" Background="{Binding Source={StaticResource aka}}"></Border>
        <Border Grid.Column="4" Grid.RowSpan="5" Background="{Binding Source={StaticResource ao}}"></Border>


        <view:PointControl Grid.Column="1" Grid.Row="1" DataContext="{Binding Aka}"/>
        <view:PointControl Grid.Column="3" Grid.Row="1" DataContext="{Binding Ao}"/>


        <Viewbox Grid.Column="2" Grid.Row="2">
            <TextBlock Text="CAT.1"  Style="{StaticResource ResourceKey=panelText}" />
        </Viewbox>
        <Viewbox Grid.Column="2" Grid.Row="3">
            <TextBlock Text="CAT.2" Style="{StaticResource ResourceKey=panelText}" />
        </Viewbox>

        <view:TimeControl Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="3"
                            DataContext="{Binding Time}" />

        <view:PenaltyDisplayControl Grid.Column="1" Grid.Row="2" LTR="True"
                                    PenaltyCommand="{Binding Aka.ChangeC1}"
                                    Penalty="{Binding Path=Aka.C1, Mode=TwoWay}"  />
        <view:PenaltyDisplayControl Grid.Column="1" Grid.Row="3" LTR="True"
                                    PenaltyCommand="{Binding Aka.ChangeC2}"
                                    Penalty="{Binding Path=Aka.C2}"  />
        <view:PenaltyDisplayControl Grid.Column="3" Grid.Row="2" 
                                    PenaltyCommand="{Binding Ao.ChangeC1}"
                                    Penalty="{Binding Path=Ao.C1}" />
        <view:PenaltyDisplayControl Grid.Column="3" Grid.Row="3" 
                                    PenaltyCommand="{Binding Ao.ChangeC2}"
                                    Penalty="{Binding Path=Ao.C2}" />
    </Grid>
</UserControl>
